import request from '@/utils/request'
export function getProgDataDetail(hostId) {
  return request({
    url: `/api/data/v1/host/${hostId}/progdata_detail`,
    method: 'get'
  })
}

// 设置编程数据
export function setProgData(hostId, data) {
  return request({
    url: `/api/data/v1/host/${hostId}/progdata`,
    method: 'put',
    data: data
  })
}

// 恢复默认
export function resetProgData(hostId) {
  return request({
    url: `/api/data/v1/host/${hostId}/reset_progdata`,
    method: 'put'
  })
}

export function getHistoryRecord(zoneId, index, size) {
  return request({
    url:
        '/api/data/v1/zone/' + zoneId +
        '/progdata_history?pageIndex=' +
        index +
        '&pageSize=' +
        size,
    method: 'get'
  })
}

